package com.kymatrix.kycarbon.xsmd.kbpm.server.model.enums;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import com.kymatrix.kycarbon.xsmd.common.business.common.BaseBusinessEnum;

/**
 * yes_no
 *
 */
public enum YesNoEnum implements BaseBusinessEnum {
    /**
     * 是
     */
    YES("1", "是"),
    /**
     * 否
     */
    NO("0", "否");
    private String code;
    private String name;
    /**
     * 未删除
     */
    public final static int Y = 1;
    /**
     * 已删除
     */
    public final static int N = 0;

    @JsonCreator
    public static YesNoEnum forValue(Object value) {
        return BaseBusinessEnum.codeOf(YesNoEnum.class, value).get();
    }

    YesNoEnum(String value, String name) {
        this.code = value;
        this.name = name;
    }

    @Override
    public String getSysConfigGroupName() {
        return SysConfigGroupName.YES_NO;
    }

    @JsonValue
    public String getCode() {
        return code;
    }

    public String getName() {
        return name;
    }

}
